﻿//Copyright (c) Microsoft Corporation. All rights reserved.

using Microsoft.Ted.Wacel;
using System.Diagnostics;

namespace Microsoft.Ted.Wacel.TestConsole.PerformanceTests
{
    public class QueuePerfTester
    {
        public static int SendReceive200_1KStringsUsingQueue(Stopwatch watch)
        {
            int count = 200;
            string load = new string('X', 1024);
            Cache.Queue<string> queue = new Cache.Queue<string>("perf_queue");
            watch.Restart();
            for (int i = 0; i < count; i++)
            {
                queue.Enqueue(load);
            }
            for (int i = 0; i < count; i++)
            {
                queue.Dequeue();
            }
            watch.Stop();
            return count;
        }
    }
}
